package com.bestow.basic.service.impl;

import java.util.List;
import com.bestow.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bestow.basic.mapper.FndAtmAttachmentMapper;
import com.bestow.basic.domain.FndAtmAttachment;
import com.bestow.basic.service.IFndAtmAttachmentService;

/**
 * 附件信息Service业务层处理
 * 
 * @author liliu
 * @date 2022-09-22
 */
@Service
public class FndAtmAttachmentServiceImpl implements IFndAtmAttachmentService 
{
    @Autowired
    private FndAtmAttachmentMapper fndAtmAttachmentMapper;

    /**
     * 查询附件信息
     * 
     * @param attachmentId 附件信息主键
     * @return 附件信息
     */
    @Override
    public FndAtmAttachment selectFndAtmAttachmentByAttachmentId(Long attachmentId)
    {
        return fndAtmAttachmentMapper.selectFndAtmAttachmentByAttachmentId(attachmentId);
    }

    /**
     * 查询附件信息列表
     * 
     * @param fndAtmAttachment 附件信息
     * @return 附件信息
     */
    @Override
    public List<FndAtmAttachment> selectFndAtmAttachmentList(FndAtmAttachment fndAtmAttachment)
    {
        return fndAtmAttachmentMapper.selectFndAtmAttachmentList(fndAtmAttachment);
    }

    /**
     * 新增附件信息
     * 
     * @param fndAtmAttachment 附件信息
     * @return 结果
     */
    @Override
    public int insertFndAtmAttachment(FndAtmAttachment fndAtmAttachment)
    {
        fndAtmAttachment.setCreateTime(DateUtils.getNowDate());
        return fndAtmAttachmentMapper.insertFndAtmAttachment(fndAtmAttachment);
    }

    /**
     * 修改附件信息
     * 
     * @param fndAtmAttachment 附件信息
     * @return 结果
     */
    @Override
    public int updateFndAtmAttachment(FndAtmAttachment fndAtmAttachment)
    {
        fndAtmAttachment.setUpdateTime(DateUtils.getNowDate());
        return fndAtmAttachmentMapper.updateFndAtmAttachment(fndAtmAttachment);
    }

    /**
     * 批量删除附件信息
     * 
     * @param attachmentIds 需要删除的附件信息主键
     * @return 结果
     */
    @Override
    public int deleteFndAtmAttachmentByAttachmentIds(Long[] attachmentIds)
    {
        return fndAtmAttachmentMapper.deleteFndAtmAttachmentByAttachmentIds(attachmentIds);
    }

    /**
     * 删除附件信息信息
     * 
     * @param attachmentId 附件信息主键
     * @return 结果
     */
    @Override
    public int deleteFndAtmAttachmentByAttachmentId(Long attachmentId)
    {
        return fndAtmAttachmentMapper.deleteFndAtmAttachmentByAttachmentId(attachmentId);
    }
}
